
<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>

<link rel="stylesheet" type="text/css" href="theme/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="theme/default/css/common.css">
<script src="theme/default/Js/Common.js"></script>
<script src="theme/default/Js/jquery-3.0.0.min.js"></script>
<script src="theme/default/js/artDialog.js?skin=blue"></script>
<link rel="stylesheet" type="text/css" href="include/webupload/webuploader.css">
<script src="include/webupload/webuploader.min.js"></script> 
<script src="include/webupload/uploads.js"></script>
<link rel='stylesheet' type="text/css" href='theme/desktop/css/font-awesome.min.css'>

</head>
<body>

<script>
function CheckFormsave()
{
	
		if(document.save.oclass.value=="")
		{
			alert("请选择公告分类!");
			document.save.oclass.focus();
			return false;
		}
		
		if(document.save.otitle.value=="")
		{
			alert("请输入公告标题!");
			document.save.otitle.focus();
			return false;
		}
	
}
</script> 
<!----------------------------------------发布公告开始----------------------------------------> 
<!----------------------------------------发布公告开始---------------------------------------->
<div class="cssout">
  <form class="layui-form" name="save" action="?action=gonggao&stype=saveadd&LaiLu=" method="post">
    <div class="cssin">
      <ul>
        <li class="w100 bg"><dd class="isin"><B>发布公告</B></dd></li>
        <li class="w25 bg cl tr"><dd class="isin">选择对象</dd></li>
        <li class="w75" style="height:auto;"><dd class="isin">
  
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="超级管理员" checked title="超级管理员">
        
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="测试" checked title="测试">
        
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="111" checked title="111">
        
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="啊" checked title="啊">
        
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="666" checked title="666">
        
          <input type="checkbox" class="btns lay-checkbox" name="oSendto" value="596874656" checked title="596874656">
        </dd></li>
        <li class="w25 bg cl tr"><dd class="isin"><font color="#FF0000">*</font> 公告分类</dd></li>
        <li class="w75"><dd class="isin">
  <select name="oclass" id="Select_Gonggaoclass"><option value="">请选择</option><option value="通知公告">通知公告</option><option value="规章制度">规章制度</option><option value="其它信息">其它信息</option></select></dd></li>
        <li class="w25 bg cl tr"><dd class="isin"><font color="#FF0000">*</font> 公告标题</dd></li>
        <li class="w75"><dd class="isin">
          <input name="otitle" type="text" id="otitle" value="" size="80"></dd></li>
          
        <li class="w25 bg cl duohang tr" style="height:335px;"><dd class="isin">公告内容</dd></li>
        
        <li class="w75 duohang" style="height:335px;">
<!-- 加载编辑器的容器 --> 
<dd class="isin" style="padding:5px;">
<textarea class="layui-textarea layui-hide" name="ogonggao" id="ogonggao"></textarea>
</dd>
        </li>
        <li class="w25 bg cl tr"><dd class="isin">发布提醒</dd></li>
        <li class="w75"><dd class="isin">
          <input name="onotice" type="radio" class="btns" value="1" title="提醒"/>
          <input name="onotice" type="radio" class="btns" value="0" checked="checked" title="不提醒"/>
          <span class="info_help vtip" title="登录系统时出现在右下角内部消息提醒中">&nbsp;</dd></li>
        <li class="w25 bg cl tr"><dd class="isin">附件</dd></li>
        <li class="w75">
		
<dd class="isin">
          <input name="ofjname" type="hidden" id="ofjname" value="">
          <input name="oFujian" type="hidden" id="oFujian" value="">
          
          
<span id="name1"> </span>
<script>
//定义一个上传
var upName1 = $("#name1").powerWebUpload(
{ 
	auto: true,//上传后是否自动上传
	fileNumLimit:1,//允许上传个数
	accept: {
	   title: '上传文件',
	   extensions: 'gif,jpg,png,bmp,doc,docx,xls,xlsx,ppt,pdf,rar,zip,txt',//允许类型 原始：'gif,jpg,jpeg,bmp,png'
	   mimeTypes: '*'//类型 原始：'image/*'
	}//限制的配置信息
});
//绑定上传完成事件 file 参数中有 原始名称 大小 后缀 类型等等参数；percentage是服务返回的参数 有信息 和图片地址
    upName1.on('uploadSuccess', function (file, percentage) {
	//var img = new Image();//定义一个图片对象
	//img.src=percentage.data.src;	//附加图片地址给图片对象
	//$("#name1").append(img)	//追加到容器中
	//alert(percentage.data.src);//file.name 原文件名 file.size 大小（b） file.ext 后缀
	$("#ofjname").val(file.name);
	$("#oFujian").val(percentage.data.src);
	
});
</script>
          
          </dd></li>
<div class="clear"></div>
      </ul>
    </div>
    <div class="h50b"></div>
    <div class="fixed_bg_B">
      <input name="oUser" type="hidden" value="超级管理员">
      <input type="submit" name="Submit" class="btn2 btnbaoc" value="保存">
      <input name="Back" type="button" id="Back" class="btn2 btnguanb" value="关闭" onClick="art.dialog.close();guanbi();">
    </div>
  </form>
</div>

<script src="theme/default/WdatePicker.js"></script> 
<script src="theme/layui/layui.js"></script> 
<script src="theme/desktop/js/common.js"></script> <script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form()
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  //创建一个编辑器
  var editindex = layedit.build('ogonggao', {
	uploadImage: {
	  url: '/include/inc/upload.asp?dopost=image' //接口url
	  ,type: '' //默认post
	}
  }); 
  //创建一个编辑器
  var editIndex2 = layedit.build('oReply', {
	height: 170 , //设置编辑器高度
	uploadImage: {
	  url: '/include/inc/upload.asp?dopost=image' //接口url
	  ,type: '' //默认post
	}
  }); 
  
});
</script>

<script>
/*弹出窗口封装代码*/
$(".open-app").on("click",function(){
	var width = $(this).data("width")?$(this).data("width"):900,//获得宽度
	height = $(this).data("height")?$(this).data("height"):400//获得高度
	url = $(this).attr("href")//获得打开URL
	title = $(this).attr("title");//获得标题	
	$.dialog.open(url, {title: title, width:width,height:height, fixed: true});
	return false;	
})
</script>

</body>
</html>
